﻿Imports BUS
Imports DTO
Public Class frmThayDoiQuyDinh
    Private Sub LoadQuyDinh()
        Dim dt As DataTable = LopHocBus.LayQuyDinh()
        txtTuoiToiThieu.Text = dt.Rows(0)(0)
        nudTuoiToiThieu.Value = dt.Rows(0)(0)

        txtTuoiToiDa.Text = dt.Rows(0)(1)
        nudTuoiToiDa.Value = dt.Rows(0)(1)

        txtSiSoToiDa.Text = dt.Rows(0)(2)
        nudSiSoToiDa1Lop.Value = dt.Rows(0)(2)

        txtSoLopToiDa10.Text = dt.Rows(0)(3)
        nudSoLopToiDa10.Value = dt.Rows(0)(3)

        txtSoLopToiDa11.Text = dt.Rows(0)(4)
        nudSoLopToiDa11.Value = dt.Rows(0)(4)

        txtSoLopToiDa12.Text = dt.Rows(0)(5)
        nudSoLopToiDa12.Value = dt.Rows(0)(5)

        txtSoHKToiDa.Text = dt.Rows(0)(6)
        nudSoHKToiDa.Value = dt.Rows(0)(6)

        txtSoMonToiDa.Text = dt.Rows(0)(7)
        nudSoMonToiDa.Value = dt.Rows(0)(7)

        txtDiemHSDat.Text = dt.Rows(0)(8)
        nudDiemHSDat.Value = dt.Rows(0)(8)
    End Sub
    Private Sub frmThayDoiQuyDinh_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadQuyDinh()
    End Sub

    Private Sub btnThoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThoat.Click
        Me.Close()
    End Sub

    Private Sub btnThayDoi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThayDoi.Click
        LopHocBus.ThayDoiQuyDinh(nudTuoiToiThieu.Value, nudTuoiToiDa.Value, nudSiSoToiDa1Lop.Value, nudSoLopToiDa10.Value, nudSoLopToiDa11.Value, nudSoLopToiDa12.Value, nudSoHKToiDa.Value, nudSoMonToiDa.Value, nudDiemHSDat.Value)
        LoadQuyDinh()

    End Sub
End Class